Opaque context

An opaque context is a linguistic context in which it is not always possible to substitute co-referential expressions (usually grammatically singular terms) salva veritate. In other words, substitution of co-referential expressions into an opaque context does not always preserve truth. For example, "Lois believes x is a hero" is an opaque context because "Louis believes Superman is a hero" is true while "Lois believes Clark Kent is a hero" is false, even though 'Superman' and 'Clark Kent' are co-referential expressions.

The term is used in philosophical theories of reference, and is to be contrasted with "transparent context". In rough outline:

Similar usage of the term applies for artificial languages such as programming languages and logics. The Cicero-Tully example above can be easily adapted. Let [x] be interpreted as a function symbol returning a "name" of the value of the variable x on a language L with domain M. Define a LengthIsSix predicate with the property that LengthIsSix([x]) is true if and only if [x] has 6 characters. Then [x] induces an opaque context, or is referentially opaque, because LengthIsSix([Cicero]) is true while LengthIsSix([Tully]) is false. Programming languages often have richer semantics than logics' semantics of truth and falsity, and so an operator such as [x] may fail to be referentially transparent for other reasons if it is not a pure function.

See also

References